package com.ibeeking.found.file.service.common.param;

import com.ibeeking.found.file.service.common.constants.RegexConstant;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;
import java.io.Serializable;

/**
 * @author ibeeking
 * @version 1.0
 * @description: 创建文件DTO
 * @date 2022/1/12 14:41
 */
@Data
public class CreateFileParam implements Serializable {
    private static final long serialVersionUID = -1L;


    /**
     * 文件路径
     */
    private String filePath;


    /**
     * 文件名
     */
    @NotBlank(message = "文件名不能为空")
    @Pattern(regexp = RegexConstant.FILE_NAME_REGEX, message = "文件名不合法！", flags = {Pattern.Flag.CASE_INSENSITIVE})
    private String fileName;


    /**
     * 扩展名
     */
    private String extendName;

}
